home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d21 / dvglue.arc / DVAPI.C < prev    next >
C/C++ Source or Header  |  1990-01-09  |  3KB  |  96 lines

  1. /*=======================================================*/
  2. /*  DVAPI.C                                              */
  3. /*   miscellaneous DESQview API functions that don't     */
  4. /*   require MASM to recompile                           */
  5. /*                                                       */
  6. /*  (c) Copyright 1988 Ralf Brown  All Rights Reserved   */
  7. /*  May be freely copied for noncommercial use, so long  */
  8. /*  as this copyright notice remains intact, and any     */
  9. /*  changes are marked in the comment blocks preceding   */
  10. /*  functions.                                           */
  11. /*=======================================================*/
  12.  
  13. #include <string.h>
  14. #include "tvapi.h"
  15.  
  16. /*======================================================*/
  17. /* DVprogname--return offset of program's name in       */
  18. /*             DESQVIEW.DVO                             */
  19. /*   Ralf Brown 4/2/88                                  */
  20. /*======================================================*/
  21.  
  22. WORD pascal DVprogname(void)
  23. {
  24.    _AX = 0xDE00 ;
  25.    geninterrupt(0x15) ;
  26.    return _AX ;
  27. }
  28.  
  29. /*======================================================*/
  30. /* DVappnum--return application's number as it appears  */
  31. /*           on the "Switch Window" menu                */
  32. /*   Ralf Brown 4/3/88                                  */
  33. /*======================================================*/
  34.  
  35. int pascal DVappnum(void)
  36. {
  37.    _AX = 0xDE07 ;
  38.    geninterrupt(0x15) ;
  39.    return _AX ;
  40. }
  41.  
  42. /*======================================================*/
  43. /* DVdbgpoke--poke a character directly into screen mem */
  44. /*            on the bottom line                        */
  45. /*   Ralf Brown 4/3/88                                  */
  46. /*======================================================*/
  47.  
  48. void pascal DVdbgpoke(char c)
  49. {
  50.    _BL = c ;
  51.    _AX = 0xDE0A ;
  52.    geninterrupt(0x15) ;
  53. }
  54.  
  55. /*======================================================*/
  56. /* DVapilevel--define the minimum API level required    */
  57. /*   Ralf Brown 4/3/88                                  */
  58. /*======================================================*/
  59.  
  60. void pascal DVapilevel(int level, int mod)
  61. {
  62.    _BL = level ;
  63.    _BH = mod ;
  64.    _AX = 0xDE0B ;
  65.    geninterrupt(0x15) ;
  66. }
  67.  
  68. /*======================================================*/
  69. /* DVpushkey--put key into keyboard input stream        */
  70. /*   Ralf Brown 4/3/88                                  */
  71. /*======================================================*/
  72.  
  73. WORD pascal DVpushkey(int key, int scancode)
  74. {
  75.    _BL = key ;
  76.    _BH = scancode ;
  77.    _AX = 0xDE10 ;
  78.    geninterrupt(0x15) ;
  79.    return _BX ;   /* usually, but not always, same as BX passed in */
  80. }
  81.  
  82. /*======================================================*/
  83. /* DVjustify  set whether visible part of window follows*/
  84. /*            cursor                                    */
  85. /*   Ralf Brown 4/8/88                                  */
  86. /*======================================================*/
  87.  
  88. void pascal DVjustify(int justify)
  89. {
  90.    _BL = justify ;
  91.    _AX = 0xDE11 ;
  92.    geninterrupt(0x15) ;
  93. }
  94.  
  95. /* End of DVAPI.C */
  96.